<?php
$GLOBALS["MY_MEM_URL"] = 'localhost';
$GLOBALS["MY_MEM_PORT"] = 11211;

function getMem(){
	if(!$GLOBALS["MY_MEM"]){
		$GLOBALS["MY_MEM"] = new Memcache;
		$GLOBALS["MY_MEM"]->connect($GLOBALS["MY_MEM_URL"], $GLOBALS["MY_MEM_PORT"]);
	}
	return $GLOBALS["MY_MEM"];
}